<template>
	<view class="selectLink">
		<view class="selectBox">
			<fui-form-item labelWidth="180" bottomBorder label="链接类型:">
				<view class="" @click="show=true">
					{{linkName?`${linkName}`:"请选择链接类型"}}
				</view>
				<fui-picker linkage :layer="1" :options="options" title="链接类型" :show="show" @change="change"
					@cancel="cancel"></fui-picker>
			</fui-form-item>
		</view>
		<view class="listBox">
			<scroll-view scroll-y :show-scrollbar="false" class="swiper" style="background-color: #F9F9F9;">
				<GoodsList></GoodsList>
			</scroll-view>
		</view>
	</view>
</template>

<script>
	import GoodsList from '@/pages/artistes/components/goods-list.vue'
	export default {
		components: {
			GoodsList
		},
		name: 'selectLink',
		data() {
			return {
				linkName: '',
				show: false,
				options: [{
					text: '商品',
					value: 1
				}, {
					text: '任务',
					value: 2
				}, {
					text: '活动',
					value: 3
				}, {
					text: '招聘',
					value: 4
				}],
			};
		},
		methods: {
			cancel() {
				this.show = false
			},
			change(e) {
				this.show = false
				this.linkName = e.text
				console.log(e)
			},
		}
	}
</script>

<style lang="scss" scoped>
	view {
		box-sizing: border-box;
	}

	.swiper {
		height: 100%;

	}

	.selectBox {
		height: 110rpx;
	}

	.listBox {
		height: calc(80vh - 110rpx);
	}

	.selectLink {
		background-color: #F8F8F8;
		width: 100vw;
		height: 80vh;
	}
</style>